import { RouterModule, Routes } from '@angular/router';
import { ModuleWithProviders } from '@angular/core';
import {PageComponent} from "./page.component";
import {DashboardComponent} from "./dashboard/dashboard.component";

export const routes = [
  { path: 'login',loadChildren: './login/login.module#LoginModule'},
  { path: 'access',loadChildren: './blank/blank.module#BlankModule'},
  {
    path: 'page',
    component:PageComponent,
    children:[
      { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
      { path: 'dashboard',  loadChildren: './dashboard/dashboard.module#DashboardModule' },
      { path: 'monitor',  loadChildren: './monitor/monitor.module#MonitorModule' },
      { path: 'repair',  loadChildren: './repair/repair.module#RepairModule' },
      { path: 'archives',  loadChildren: './archives/archives.module#ArchivesModule' },
      { path: 'statistics',  loadChildren: './statistics/statistics.module#StatisticsModule' },
      { path: 'inform',  loadChildren: './inform/inform.module#InformModule' },
      { path: 'accountinfo',  loadChildren: './account-info/account-info.module#AccountInfoModule' },
      { path: 'sys',  loadChildren: './sys/sys.module#SysModule' }
    ]
  }
];

export const PageRoute: ModuleWithProviders = RouterModule.forChild(routes);

